package org.example.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 车间设置
 * @TableName workshop
 */
@TableName(value ="workshop")
@Data
public class Workshop implements Serializable {
    /**
     * 车间编码
     */
    @TableId
    private String workshopCode;

    /**
     * 车间名称
     */
    private String workshopName;

    /**
     * 负责人
     */
    private String principal;

    /**
     * 面积
     */
    private Integer area;

    /**
     * 是否启用（0:是，1：否）
     */
    private String isEnabled;

    /**
     * 备注
     */
    private String remark;

    /**
     * 
     */
    private String column7;

    /**
     * 
     */
    private String column8;

    /**
     * 
     */
    private String column9;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Workshop other = (Workshop) that;
        return (this.getWorkshopCode() == null ? other.getWorkshopCode() == null : this.getWorkshopCode().equals(other.getWorkshopCode()))
            && (this.getWorkshopName() == null ? other.getWorkshopName() == null : this.getWorkshopName().equals(other.getWorkshopName()))
            && (this.getPrincipal() == null ? other.getPrincipal() == null : this.getPrincipal().equals(other.getPrincipal()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getIsEnabled() == null ? other.getIsEnabled() == null : this.getIsEnabled().equals(other.getIsEnabled()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getColumn7() == null ? other.getColumn7() == null : this.getColumn7().equals(other.getColumn7()))
            && (this.getColumn8() == null ? other.getColumn8() == null : this.getColumn8().equals(other.getColumn8()))
            && (this.getColumn9() == null ? other.getColumn9() == null : this.getColumn9().equals(other.getColumn9()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWorkshopCode() == null) ? 0 : getWorkshopCode().hashCode());
        result = prime * result + ((getWorkshopName() == null) ? 0 : getWorkshopName().hashCode());
        result = prime * result + ((getPrincipal() == null) ? 0 : getPrincipal().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getColumn7() == null) ? 0 : getColumn7().hashCode());
        result = prime * result + ((getColumn8() == null) ? 0 : getColumn8().hashCode());
        result = prime * result + ((getColumn9() == null) ? 0 : getColumn9().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", workshopCode=").append(workshopCode);
        sb.append(", workshopName=").append(workshopName);
        sb.append(", principal=").append(principal);
        sb.append(", area=").append(area);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", remark=").append(remark);
        sb.append(", column7=").append(column7);
        sb.append(", column8=").append(column8);
        sb.append(", column9=").append(column9);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}